package com.winit.requirement.repository;

import com.winit.requirement.model.ReqNotice;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface ReqNoticeRepository extends CrudRepository<ReqNotice, String> {
    @Query(value = "select * from matrix_req_notice where 1 = 1 and (?1 is null or  id = ?1) and (?2 is null or number = ?2) and (?3 is null or req_id = ?3)", nativeQuery = true)
    List<ReqNotice> findByProperties(String id, String number, String reqId);
}
